#pragma once
#include"hash.h"

template<class K,class Hash = HashFunc<K>>
class Unordered_set
{
	struct SetKeyofT
	{
		const K& operator()(const K& key)
		{
			return key;
		}
	};

public:
	typedef typename HashTables<K, K, SetKeyofT,Hash>::Iterator iterator;
	typedef typename HashTables<K, K, SetKeyofT,Hash>::ConstIterator const_iterator;

	iterator begin()
	{
		return _ht.Begin();
	}

	iterator end()
	{
		return _ht.End();
	}

	const_iterator begin()const
	{
		return _ht.Begin();
	}

	const_iterator end()const
	{
		return _ht.End();
	}


	bool insert(const K& key)
	{
		return _ht.Insert(key);
	}

private:
	HashTables<K, K, SetKeyofT,Hash> _ht;
};
